package org.example.test;


import lombok.extern.slf4j.Slf4j;
import org.example.domain.auth.service.IAuthService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * @author yinghuashen
 * @version 1.0
 * @description
 * @date 2025/3/4 10:00
 */

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class insertUser {

    @Resource
    private IAuthService authService;

    @Test
    public void testInsertUser() {
//        authService.registerUser("user_01", "19801180590", "123456");
//        authService.registerUser("user_02", "19801180591", "123456");
        for (int i = 1; i <= 100; i++) {
            String username = "user_" + String.format("%03d", i);
            String phoneNumber = "1980118" + String.format("%04d", i);
            String password = "123456";
            authService.registerUser(username, phoneNumber, password);
        }
    }
}
